package polymorphism_0914;

/**
 * 答案：D的func方法,num=0
 */
class B{
    public B(){
        func();
    }
    public void func(){
        System.out.println("B的func方法");
    }
}
public class D extends B {
    private int num=1;

    @Override
    public void func() {
        System.out.println("D的func方法,num="+num);
    }

    public static void main(String[] args) {
        D d=new D();
    }
}
